{include file="$header" /}
<div class="mk-app-warp">
    <mk-table
        url="banner/index"
        save-url="banner/save"
        update-url="banner/update"
        delete-url="banner/delete"
        synchro-url="banner/synchro"
        drop-url="banner/sort"
        copy-url="banner/copyList"
        :date-search="false"
        :catalog="catalog"
        :field="field">
    </mk-table>
</div>
{include file="$component" /}
<script>
    var catalog = tree.convertString({:json_encode($catalog)});
    new Vue({
        el: '#app',
        data() {
            return {
                field: [
                    {
                        prop: 'cover', 
                        label: '封面', 
                        type: 'image', 
                        width: '60px',
                        rules: {required: true}
                    },
                    {
                        prop: 'catalog_id', 
                        label: '分类', 
                        type: 'select', 
                        option: catalog, 
                        tree: true, 
                        multiple: true,
                        props:{label: 'title', value: 'id'}, 
                        rules: {required: true},
                    },
                    {
                        prop: 'video', 
                        label: '视频', 
                        type: 'file',
                        fileType: 'video',
                        table: false, 
                    },
                    {
                        prop: 'title', 
                        label: '标题',  
                    },
                    {
                        prop: 'link', 
                        label: '地址', 
                        type: 'link',
                        table: false, 
                    },
                    {
                        prop: 'status', 
                        label: '状态',  
                        type: 'switch', 
                        default: 1,
                        width: '100px'
                    },
                    {
                        prop: 'detail', 
                        label: '描述', 
                        type: 'textarea',
                        form: false,
                        table: false, 
                    },
                    {
                        prop: 'content', 
                        label: '详情', 
                        type: 'editor',
                        table: false, 
                    },
                ],
            }
        },
    })
</script>
{include file="$footer" /}